package com.web;

import com.pojo.dto.Message;
import com.pojo.vo.CUsedVo;
import com.service.CUsedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
public class CUsedController {
    @Autowired
    CUsedService cUsedService;

    @PostMapping("/cusedlist")
    public Message<List<CUsedVo>> findList(CUsedVo cUsedVo) {
        return cUsedService.list(cUsedVo);
    }

    @PostMapping("/cusedone")
    public Message<CUsedVo> get(CUsedVo cUsedVo) {
        return cUsedService.get(cUsedVo);
    }

    @PostMapping("/cused/add")
    public Message<CUsedVo> add(CUsedVo cUsedVo) {
        return cUsedService.add(cUsedVo);
    }

    @PostMapping("/cused/delete")
    public Message<CUsedVo> delete(CUsedVo cUsedVo) {
        return cUsedService.delete(cUsedVo);
    }

    @PostMapping("/cused/edit")
    public Message<CUsedVo> edit(CUsedVo cUsedVo) {
        return cUsedService.edit(cUsedVo);
    }
}
